﻿/*
 * KLF Headless Browser
 * Written by Kris Oye <kristianoye@gmail.com>
 * Copyright (C) 2011-2012.  All rights reserved.
 */
namespace KLF.Lib.Browser.DOM.HTML
{
    #region Using Statements

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;

    #endregion

    public enum HTMLLintEntryType
    {
        Warning = 1,
        Strict = 2,
        Error = 3
    }

    public class HTMLLintEntry
    {
        public HTMLLintEntryType Type { get; set; }

        public string Message { get; set; }
    }

    /// <summary>
    /// Collections lint information from a document.
    /// </summary>
    public class HTMLLint
    {
        public List<HTMLLintEntry> Entries { get; set; }

        public void AddWarning(string str)
        {
            Entries.Add(new HTMLLintEntry() { Message = str, Type = HTMLLintEntryType.Warning });
        }

        public void AddStrict(string str)
        {
            Entries.Add(new HTMLLintEntry() { Message = str, Type = HTMLLintEntryType.Strict });
        }

        public void AddError(string str)
        {
            Entries.Add(new HTMLLintEntry() { Message = str, Type = HTMLLintEntryType.Error });
        }
    }
}
